package com.infore.siteManagement.entity.otherEntity;

import java.io.Serializable;
import java.util.Set;

import javax.persistence.*;

import org.hibernate.annotations.GenericGenerator;

import com.fasterxml.jackson.annotation.JsonBackReference;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.infore.siteManagement.entity.Station;


/**
 * llf
 * The persistent class for the PROTOCOL_IDS database table.
 * 保存协议id实体类 用于维护多对多
 */
@Entity
@Table(name="PROTOCOL_IDS")
@NamedQuery(name="ProtocolId.findAll", query="SELECT p FROM Protocol p")
public class Protocol implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="PROTOCOL_ID")
	@GeneratedValue(generator = "uuidGenerator")
	@GenericGenerator(name = "uuidGenerator", strategy = "uuid") // UUID生成策略
	private String protocolId;
	
	@JsonIgnoreProperties("protocols")
	@ManyToMany(mappedBy="protocols") // 
	private Set<Station> station_Protocol;

	public Protocol() {
	}

	public String getProtocolId() {
		return this.protocolId;
	}

	public void setProtocolId(String protocolId) {
		this.protocolId = protocolId;
	}

	@JsonBackReference
	public Set<Station> getStation_Protocol() {
		return station_Protocol;
	}

	@JsonBackReference
	public void setStation_Protocol(Set<Station> station_Protocol) {
		this.station_Protocol = station_Protocol;
	}

}